package com.guodefu.unifiedresponse.exception;import com.guodefu.unifiedresponse.entity.Response;import lombok.Getter;import java.io.Serial;/** * 继承异常类 * 用于调用其他微服务结果为非正常状态，需要直接将获取的响应返回给前端时，抛出该异常 * * @author guodefu909 **/public class InheritedException extends RuntimeException {    @Serial    private static final long serialVersionUID = 1L;    @Getter    private final Response<?> response;    private InheritedException(Response<?> response) {        this.response = response;    }    public static InheritedException instance(Response<?> response) {        return new InheritedException(response);    }}